package chapter02

object Test07_Function4 {
  def main(args: Array[String]): Unit = {
    //使用递归方式计算阶乘
    def jiecheng(a:Int): Int = {
      if(a==1) 1 else a*jiecheng(a-1)
    }
    println(jiecheng(5))
  }
}
